/*
 * 天虹商场股份有限公司版权所有.
 */
package com.rainbow.mybatis.type;

/**
 * TODO
 *
 * @author 黄明坤
 * @version 1.0.0
 * @date 2020/6/29
 */
public enum IntereceptorEnum {

    EXECUTOR(1,"executor"),
    STATEMENT(2,"statement"),
    RESULTSET(3,"resultSet"),
    PARAMETER(4,"parameter");

    IntereceptorEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    private int type;

    private String desc;

    public static IntereceptorEnum getByCode(int code) {
        for (IntereceptorEnum c : IntereceptorEnum.values()) {
            if (c.type == code) {
                return c;
            }
        }
        return null;
    }
}
